<!DOCTYPE html>
<html>
<head>
    <#assign secSelect = JspTaglibs["http://www.casic304.cn/secSelect"] />
    <#assign fillDept=JspTaglibs["http://www.casic304.cn/fillDept"] />
    <#assign dicSelect = JspTaglibs["http://www.casic304.cn/dicSelect"]/>
    <meta charset="utf-8">
    <title>紧固件</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="${ctx}/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="${ctx}/qbdmsStatic/iconfont/iconfont.css"/>
    <link rel="stylesheet" href="${ctx}/qbdmsStatic/style/qbdms.css">
    <script type="text/javascript">
        var __ctx = "${ctx}";
    </script>
<#--    <style>-->
<#--        .qbdms-TBinformation{margin-left: 0px;}-->
<#--        .qbdms-TBinformationText{margin-left: 145px;}-->
<#--    </style>-->
    <#if isClose == 'true'>
        <style>
            .listBody .qbdms-bodyDiv{padding: 0 }
            body.qbdms-particulars .qbdms-bodyDiv div.layui-table-view-body{padding: 16px}
            .treeFormPreview{position: unset;}
        </style>
    </#if>
</head>
<body class="listBody  qbdms-particulars">
<div class="qbdms-bodyDiv">
    <div class="layui-table-view-body qbdms-add-view-body" >
        <#if isClose != 'true'><div class="qbdms-formTitle" style="border-bottom: 1px solid #E5F0FF">紧固件 <i class="qbdms-returnOn closeWindow">返回</i></div></#if>
        <form class="layui-form treeFormPreview"  requrl="${ctx}/qbdms/wQbdFastenerInformation/get"  lay-filter="wQbdFastenerInformationDataForm">
            <div class="" style="width: 100%;overflow-x: auto">

                <table class="tableExcel qbdms-zeroTable" width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tbody>
                    <tr id="tbxx">
                    </tr>

                    <tr>
                        <td class="qbdms-zeroTable-lable">密级<span style="color: red;">*</span></td>
                        <td name=''>
                            <@secSelect.sec_select data_src=1 required=true name="secret"/>
                        </td>
                    <tr>
                        <td class="qbdms-zeroTable-lable">检验项名称<span style="color: red;">*</span></td>
                        <td name=''>
                            <select name="inspectionItemName" lay-verify="required" lay-reqtext="检验项名称是必填项"
                                    lay-filter="inspectionItemName" maxlength="50"></select>
                        </td>
                    <tr>
                        <td class="qbdms-zeroTable-lable">检测时间<span style="color: red;">*</span></td>
                        <td name='detectionTime'></td>
                        <input type="hidden" name="detectionTime"  placeholder="请输入"
                               autocomplete="off" class="layui-input dateTimeFiled input-right time-init"
                               maxlength="50" fieldname="detectionTime"  lay-verify="required" lay-reqtext="检测时间是必填项">
                    <tr>
                        <td class="qbdms-zeroTable-lable">生产企业类别<span style="color: red;">*</span></td>
                        <td name=''>
                            <@dicSelect.dic name="productionEnterpriseCategory" nodeKey="scqylb" verify="required" reqtext="生产企业类别是必填项"/>
                        </td>
                    <tr>
                        <td class="qbdms-zeroTable-lable">产品名称<span style="color: red;">*</span></td>
                        <td name='productName'></td>
                    <tr>
                        <td class="qbdms-zeroTable-lable">产品标准</td>
                        <td name='productStandards'></td>
                    <tr>
                        <td class="qbdms-zeroTable-lable">规格型号</td>
                        <td name='specificationModel'></td>
                    <tr>
                        <td class="qbdms-zeroTable-lable">材料/性能等级</td>
                        <td name='performanceLevel'></td>
                    <tr>
                        <td class="qbdms-zeroTable-lable">检测标准</td>
                        <td name='testingStandards'></td>
                    <tr>
                        <td class="qbdms-zeroTable-lable">不合格批次（批号）</td>
                        <td name='unqualifiedBatch'></td>
                    <tr>
                        <td class="qbdms-zeroTable-lable">不合格检测项目</td>
                        <td name=''>
                            <select name="unqualifiedTestingItems" id="testingItems" lay-search="" maxlength="50"></select>
                        </td>
                    <tr>
                        <td class="qbdms-zeroTable-lable">不合格等级</td>
                        <td name=''>
                            <@dicSelect.dic name="unqualifiedGrade" nodeKey="bhgdj" />
                        </td>
                    <tr>
                        <td class="qbdms-zeroTable-lable">备注</td>
                        <td name='remark'></td>
                    </tr>



                    </tbody>
                </table>

            </div>
            <input type="hidden" name="id" placeholder="请输入" autocomplete="off" class="layui-input "
                   maxlength="50" fieldname="id">
            <#if isClose != 'true'>
                <div class="layui-form-item btnformItem">
                    <p>
                        <button type="reset" id="closeWindow"
                                class="closeWindow layui-btn layui-btn-sm btn-save qbdms-oneBtnLine">返回
                        </button>
                    </p>
                </div>
            </#if>
        </form>
    </div>
</div>



<script src="${ctx}/qbdmsStatic/public/configFile.js"></script>
<script src="${ctx}/layui/layui.js"></script>
<script>
    layui.config({
        base: serverPath.qbdmsPath + staticPath.qbdmsPath //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index','common','laydate','jquery','publicMethods','propsHandle'], function () {
        var laydate = layui.laydate;
        var $ = layui.jquery;
        var common = layui.common;
        var publicMethods = layui.publicMethods;
        var dateTimeFiledLen = $(".dateTimeFiled");
        for(var i=0;i<dateTimeFiledLen.length;i++){
            laydate.render({
                elem: dateTimeFiledLen[i] //指定元素
                ,type: 'date'
                ,trigger: 'click'
            });
        }
        var propsHandle = layui.propsHandle;
        var  defProps = {
                //viewMould: 'form/formDef/view/formDesign/moulds/', // 组件模块 存放文件 *****
                viewMould: 'moulds/', // 组件模块 存放文件 *****
                selectorBtn: '.selectorBtn'
            },
            temQuery = new propsHandle();  // 实例化模板功能部分

        // 初始化模板功能
        temQuery.initTem({
            selectorBtn: defProps.selectorBtn,
            selectorTemPath: setter.views + defProps.viewMould
        });

        //关闭当前页面
        $("#closeWindow,.closeWindow").click(function () {
            if ("${isClose}" == "true") {
                parent.layer.close(parent.layer.getFrameIndex(window.name));
            }
            window.location.href = serverPath.qbdmsPath + '/qbdms/wQbdFastenerInformation/view/list';
        });


        var runId = "${runId}";
        if(runId == null || runId == ''){
            $("#hideAndShow").show();
        }

        var index = parent.layer.getFrameIndex(window.name);
        common.updateForm({
            name:'wQbdFastenerInformationDataForm',
            idValue:"${id}",
            primary:"id",
            getCallback: function (data) {
                // $("#tbxx").html("<span class='qbdms-TBinformation'>填报信息:</span><span class='qbdms-TBinformationText'>【" + data.data.filldept + " | " + data.data.fillman + " | " + data.data.filldate + "】</span>");
                $("#tbxx").html("<td class='qbdms-zeroTable-lable'>填报信息:</td><td colspan='5' class=''>【"+data.data.filldept+" | "
                    +data.data.fillman+"  | "+data.data.filldate+"】</td>");
                initBHGJCXM(data.data.inspectionItemName);
            }
        });

        // 检验项名称
        var jyxmcDic = eval('${jyxmcDic}');
        common.initDicData("inspectionItemName", jyxmcDic);

        //不合格检测项目
        function initBHGJCXM(itemKey) {
            var bhgjcxmDic="";
            switch (itemKey) {
                case "螺栓":
                    bhgjcxmDic = eval('${lsbhgjcxmDic}');
                    break;
                case "螺母":
                    bhgjcxmDic = eval('${lmbhgjcxmDic}');
                    break;
                case "垫圈":
                    bhgjcxmDic = eval('${dqbhgjcxmDic}');
                    break;
                case "铆钉":
                    bhgjcxmDic = eval('${mdbhgjcxmDic}');
                    break;
                case "其它":
                    bhgjcxmDic = eval('${qtbhgjcxmDic}');
                    break;
                default:
                    break;
            }
            common.initDicData("unqualifiedTestingItems",bhgjcxmDic);
        }

        publicMethods.bottomFixd()
        $("body *").not("#closeWindow").attr("disabled", "disabled");
    });

</script>
</body>
</html>